home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / perl5 / AutoSplit.z / AutoSplit
Encoding:
Text File  |  2002-10-03  |  5.5 KB  |  199 lines

  1.  
  2.  
  3.  
  4. AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))                                                      AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      AutoSplit - split a package for autoloading
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.       autosplit($file, $dir, $keep, $check, $modtime);
  13.  
  14.       autosplit_lib_modules(@modules);
  15.  
  16.  
  17. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      This function will split up your program into files that the AutoLoader
  19.      module can handle. It is used by both the standard perl libraries and by
  20.      the MakeMaker utility, to automatically configure libraries for
  21.      autoloading.
  22.  
  23.      The autosplit interface splits the specified file into a hierarchy rooted
  24.      at the directory $dir. It creates directories as needed to reflect class
  25.      hierarchy, and creates the file _a_u_t_o_s_p_l_i_t._i_x. This file acts as both
  26.      forward declaration of all package routines, and as timestamp for the
  27.      last update of the hierarchy.
  28.  
  29.      The remaining three arguments to autosplit govern other options to the
  30.      autosplitter.
  31.  
  32.      $keep
  33.        If the third argument, $_k_e_e_p, is false, then any pre-existing *.al
  34.        files in the autoload directory are removed if they are no longer part
  35.        of the module (obsoleted functions).  $keep defaults to 0.
  36.  
  37.      $check
  38.        The fourth argument, $_c_h_e_c_k, instructs autosplit to check the module
  39.        currently being split to ensure that it does include a use
  40.        specification for the AutoLoader module, and skips the module if
  41.        AutoLoader is not detected.  $check defaults to 1.
  42.  
  43.      $modtime
  44.        Lastly, the $_m_o_d_t_i_m_e argument specifies that autosplit is to check the
  45.        modification time of the module against that of the autosplit.ix file,
  46.        and only split the module if it is newer.  $modtime defaults to 1.
  47.  
  48.      Typical use of AutoSplit in the perl MakeMaker utility is via the
  49.      command-line with:
  50.  
  51.       perl -e 'use AutoSplit; autosplit($ARGV[0], $ARGV[1], 0, 1, 1)'
  52.  
  53.      Defined as a Make macro, it is invoked with file and directory arguments;
  54.      autosplit will split the specified file into the specified directory and
  55.      delete obsolete .al files, after checking first that the module does use
  56.      the AutoLoader, and ensuring that the module is not already currently
  57.      split in its current form (the modtime test).
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))                                                      AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))
  71.  
  72.  
  73.  
  74.      The autosplit_lib_modules form is used in the building of perl. It takes
  75.      as input a list of files (modules) that are assumed to reside in a
  76.      directory lllliiiibbbb relative to the current directory. Each file is sent to the
  77.      autosplitter one at a time, to be split into the directory lllliiiibbbb////aaaauuuuttttoooo.
  78.  
  79.      In both usages of the autosplitter, only subroutines defined following
  80.      the perl ___E_N_D__ token are split out into separate files. Some routines
  81.      may be placed prior to this marker to force their immediate loading and
  82.      parsing.
  83.  
  84.      MMMMuuuullllttttiiiipppplllleeee ppppaaaacccckkkkaaaaggggeeeessss
  85.  
  86.      As of version 1.01 of the AutoSplit module it is possible to have
  87.      multiple packages within a single file. Both of the following cases are
  88.      supported:
  89.  
  90.         package NAME;
  91.         __END__
  92.         sub AAA { ... }
  93.         package NAME::option1;
  94.         sub BBB { ... }
  95.         package NAME::option2;
  96.         sub BBB { ... }
  97.  
  98.         package NAME;
  99.         __END__
  100.         sub AAA { ... }
  101.         sub NAME::option1::BBB { ... }
  102.         sub NAME::option2::BBB { ... }
  103.  
  104.  
  105. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  106.      AutoSplit will inform the user if it is necessary to create the top-level
  107.      directory specified in the invocation. It is preferred that the script or
  108.      installation process that invokes AutoSplit have created the full
  109.      directory path ahead of time. This warning may indicate that the module
  110.      is being split into an incorrect path.
  111.  
  112.      AutoSplit will warn the user of all subroutines whose name causes
  113.      potential file naming conflicts on machines with drastically limited (8
  114.      characters or less) file name length. Since the subroutine name is used
  115.      as the file name, these warnings can aid in portability to such systems.
  116.  
  117.      Warnings are issued and the file skipped if AutoSplit cannot locate
  118.      either the ___E_N_D__ marker or a "package Name;"-style specification.
  119.  
  120.      AutoSplit will also emit general diagnostics for inability to create
  121.      directories or files.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))                                                      AAAAuuuuttttooooSSSSpppplllliiiitttt((((3333))))
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                                                                         PPPPaaaaggggeeee 3333
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.